home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 090 / byt86jan.arc / AIREAD.ME next >
Encoding:
Text File  |  1985-12-27  |  2.0 KB  |  49 lines

  1. The prolog listing FRAMES.PRO will compile and run under PDPROLOG.  The major
  2. limitation of PDPROLOG in this context is that it does not support
  3. floating-point arithmetic.  We have truncated the value of pi in the
  4. cylinder cross-sectional area routine to 3.  An alternative approach would
  5. be to use, e.g., 314 and mentally divide each area and volume by 100 to
  6. obtain an answer to two decimal points.  In any case, when you enter values
  7. from the keyboard for, e.g., the Radius, you must use integer values if
  8. you are running PDPROLOG.
  9.  
  10. To invoke the program, boot PDPROLOG and type:
  11. consult('frames').
  12. After the program has compiled, type:
  13. frame_put(cylinder1,radius,2).
  14. frame_put(cylinder1,height,10).
  15. etc.
  16.  
  17. In order to see the affect of entering a value for the radius or height,
  18. you may either type:
  19. listing(cylinder1).
  20. (Don't forget the period at the end of commands).
  21. Or, you may use the frame_get predicate:
  22. frame_get(cylinder1,X,Y).
  23. X and Y must be capital letters.  Initial caps indicate variable names in
  24. Prolog.
  25.  
  26. To change values for cylinder1, you may use either
  27. frame_remove(cylinder1,radius). [or
  28. frame_remove(cylinder1,name-of-slot-to-be-deleted).] followed by
  29. frame_put(ENTER NEW VALUE AS EXPLAINED FOR FRAME_PUT ABOVE),
  30. or frame_replace(cylinder1,radius,4).  or whatever value you want changed.
  31. This form allows the new value to be entered in one step, but is otherwise
  32. equivalent to frame_remove folloed by frame_put.
  33.  
  34. To end a pdprolog session and return to the operating system level,
  35. enter "exitsys." (without the quotes, of course).
  36.  
  37. LISTING2.PRO AND LISTING3.PRO ARE NOT STAND-ALONE PROGRAMS.  THEY CANNOT BE
  38. EXECUTED.
  39.  
  40. The current version of pdprolog, pdprolog 1.8 is included on this disk.
  41. Full documentation and other sample prolog programs are available for
  42. downloading from BYTEnet Listings (617)861-9764 or from BIX.
  43.  
  44. PDPROLOG.EXE IS A PC-DOS OR MS-DOS PROGRAM ONLY.
  45.  
  46. lable for
  47. downloading from BYTEnet Listings (617)861-9764 or from BIX.
  48.  
  49. PDPROLOG.EXE IS A PC-DOS OR MS-